<!--
 * @Author: daidai
 * @Date: 2022-03-01 15:51:43
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-09-29 15:12:46
 * @FilePath: \web-pc\src\pages\big-screen\view\indexs\right-bottom.vue
-->
<template>
  <div class="right_bottom">
<!--    <dv-capsule-chart :config="config" style="width:100%;height:260px" />-->
<!--    <Reacquire v-else @onclick="getData" style="line-height: 200px">-->
<!--      重新获取-->
<!--    </Reacquire>-->
    <div class="data_display">
      <div class="data_item">孔号：{{ markerData.holeLocationId }}</div><br>
      <div class="data_item">抽/注水层位：{{ markerData.pumpNumber }}</div><br>
      <div class="data_item">钻孔单位涌水量：{{ markerData.yieldPerUnit }}L/(s*m)</div><br>
      <div class="data_item">渗透系数：{{ markerData.permeabilityCoefficient }}</div>
      <div class="data_item">含水层观测水位：{{ markerData.loc }}</div>
      <div class="data_item">抽/注水段埋深：{{ markerData.pumpDepthDown }}~{{markerData.pumpDepthUp}} (单位：m)</div>
    </div>
  </div>
</template>

<script>
import Mock from 'mockjs'; // 导入mock.js
export default {
  props: {
    markerData: {
      type: Object,
      default: () => ({
        holeLocationId: '未知',
        pumpNumber: '未知',
        yieldPerUnit: '未知',
        permeabilityCoefficient: '未知',
        loc: '未知',
        pumpDepthDown: '未知',
        pumpDepthUp: '未知'
      })
    }
  },

  data() {
    return {

    };
  },
  created() {
    // 如果markerData没有传递数据，则调用getData方法获取数据并更新markerData的值
    if (!this.markerData) {
      this.getData();
    }
  },
  computed: {
  },
  mounted() { },
  beforeDestroy() {
    this.clearData()
  },
  methods: {
    clearData() {
      if (this.timer) {
        clearInterval(this.timer)
        this.timer = null
      }
    },
    getData() {
      // 使用mock.js生成模拟数据
      const data = Mock.mock({
        'holeLocationId': "未知",
        'pumpNumber': "未知",
        'yieldPerUnit': "未知",
        'permeabilityCoefficient': "未知",
        'loc': "未知",
        'pumpDepthDown': "未知",
        'pumpDepthUp': "未知"
      });

      // 更新markerData的值
      this.markerData = {
        holeLocationId: data.holeLocationId,
        pumpNumber: data.pumpNumber,
        yieldPerUnit: data.yieldPerUnit,
        permeabilityCoefficient: data.permeabilityCoefficient,
        loc: data.loc,
        pumpDepthDown: data.pumpDepthDown,
        pumpDepthUp: data.pumpDepthUp
      };
    }
  },
};
</script>
<style lang='scss' scoped>
.list_Wrap {
  height: 100%;
  overflow: hidden;
  :deep(.kong)   {
    width: auto;
  }
}

.sbtxSwiperclass {
  .img_wrap {
    overflow-x: auto;
  }

}

.right_bottom {
  box-sizing: border-box;
  //padding: 0 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  //align-items: start;  // 对齐到左边
  .data_display {
    .data_item {
      margin-bottom: 20px;  // 增加行距
      font-size: 18px;      // 调整字体大小
      font-weight: bold;    // 加粗字体
      color: #333;
      background: linear-gradient(
              92deg,
              #0072ff 0%,
              #00eaff 48.8525390625%,
              #01aaff 100%
      ); // 设置渐变色背景
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;  // 渐变色填充文本
      display: inline-block; // 确保背景只覆盖文字部分
    }
  }

  .searchform {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;

    .searchform_item {
      display: flex;
      justify-content: center;
      align-items: center;

      label {
        margin-right: 10px;
        color: rgba(255, 255, 255, 0.8);
      }

      button {
        margin-left: 30px;
      }

      input {}
    }
  }

  .img_wrap {
    display: flex;
    // justify-content: space-around;
    box-sizing: border-box;
    padding: 0 0 20px;
    // overflow-x: auto;

    li {
      width: 105px;
      height: 137px;
      border-radius: 6px;
      overflow: hidden;
      cursor: pointer;
      // background: #84ccc9;
      // border: 1px solid #ffffff;
      overflow: hidden;
      flex-shrink: 0;
      margin: 0 10px;

      img {
        flex-shrink: 0;
      }
    }




  }

  .noData {
    width: 100%;
    line-height: 100px;
    text-align: center;
    color: rgb(129, 128, 128);

  }
}
</style>